//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "fn_postInit.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

INIT_DEBUG(0);

TLOG("PostInit Started");

private ["_i","_not_found_obj","_task_marker","_local_task_marker","_k","_not_found","_none_found","_text_marker","_ammoBoxes"];
_i = 0;
_not_found_obj = 0;
_task_marker = "";
_local_task_marker = "";
while {_not_found_obj < 100} do {
	_k = 0;
	_not_found = 0;
	_none_found = true;
	while {_not_found < 10} do {
		_task_marker = format["marker%1_%2",_i, _k];
		_local_task_marker = format[TMF_LOCAL_MARKER_NAME,_i,_k];
		if (((getMarkerPos _task_marker) vectorDistance [0,0,0]) > 0) then {
			TRACE_1("Task Marker",_task_marker);
			_text_marker = markerText _task_marker;
			createMarkerLocal [_local_task_marker, (getMarkerPos _task_marker)];
			_local_task_marker setMarkerTextLocal (_text_marker call FFUNC(Translate));
			_local_task_marker setMarkerSizeLocal (markersize _task_marker);
			_local_task_marker setMarkerTypeLocal (markertype _task_marker);
			_local_task_marker setMarkerColorLocal (markercolor _task_marker);
			_local_task_marker setMarkerShapeLocal (markershape _task_marker);
			_local_task_marker setMarkerBrushLocal (markerbrush _task_marker);
			_local_task_marker setMarkerDirLocal (markerdir _task_marker);
			_task_marker setMarkerAlpha 0;
			if (_i > 0) then { _local_task_marker setMarkerAlphaLocal 0; };
			_none_found = false;
		} else {
			_not_found = _not_found + 1;
		};
		_k = _k + 1;
	};
	if (_none_found) then {
		_not_found_obj = _not_found_obj + 1;
	};
	_i = _i + 1;
};

TRACE("End");
